create or replace trigger AI_CUENTAS     
	before insert on CUENTAS  for each row begin
		if inserting then       if :NEW."NRO_CUENTA" is null then
			select S_CUENTAS.nextval into :NEW."NRO_CUENTA" from dual;
		end if;
	end if;
end;
/


CREATE OR REPLACE TRIGGER "AI_MOVIMIENTOS" 
	before insert on "MOVIMIENTOS" for each row 
	begin     
		if inserting then
			if :NEW."ID_MOV" is null then
				select MOVIMIENTOS_ID.nextval into :NEW."ID_MOV" from dual;
			end if;
		end if;
	end;
/
 

CREATE OR REPLACE TRIGGER "AI_PLAZO_FIJO" 
  before insert on "PLAZO_FIJO" for each row 
  begin     
	  if inserting then
	  	if :NEW."ID_PFJ" is null then
	  		select PLAZO_FIJO_ID.nextval into :NEW."ID_PFJ" from dual;
  		end if;
  	  end if;
  end;
/
 

  CREATE OR REPLACE TRIGGER "AI_PRESTAMOS"
  before insert on "PRESTAMOS" for each row
  	begin
	  	if inserting then
	  		if :NEW."ID_PRESTAMO" is null then
	  			select PRESTAMOS_ID.nextval into :NEW."ID_PRESTAMO" from dual;
	  		end if;
  		end if;
  	end;
/


  CREATE OR REPLACE TRIGGER "AI_SERVICIOS"
  before insert on "SERVICIOS" for each row begin
	  if inserting then
		  if :NEW."ID_SERV" is null then
		  	select SERVICIOS_ID.nextval into :NEW."ID_SERV" from dual;
		  end if;
	  end if;
  end;
/
 
